package com.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.constant.MessageConstant;
import com.constant.RedisConstant;
import com.entity.PageResult;
import com.entity.QueryPageBean;
import com.entity.Result;
import com.pojo.Setmeal;
import com.service.SetmealService;
import com.utils.QiniuUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import redis.clients.jedis.JedisPool;

import java.io.IOException;
import java.util.UUID;

@RestController
@RequestMapping("/setmeal")
public class SetmealController {
   @Reference
   private SetmealService setmealService;
   @Autowired
   private JedisPool jedisPool;
    //<!--分页查询套餐数据,以及对应的关联检查组数据-->
    @RequestMapping("/findAllSetmeal")
    public Result findSetmeal(){
        Result result = null;
        try {
            result = setmealService.findSetmeal();
        } catch (Exception e) {
            e.printStackTrace();
            result =new Result(false,"查询失败了");
        }
        return result;
    };
    @RequestMapping("/findDetailedById")
    public Result  findDetailedById(int id){
        Result re = setmealService.findDetailedById(id);
        return re;
    };
}
